package router

import (
	"api-gateway/basic/config"
	"api-gateway/handler/api"
	"github.com/gin-gonic/gin"
	"github.com/share309/gojwt"
)

func Router(r *gin.Engine) {
	apiGroup := r.Group("/apiGroup")
	{
		user := apiGroup.Group("/user")
		{
			//用户注册
			user.POST("/register", api.RegisterUser)
			//用户登录
			user.POST("/login", api.LoginUser)
			user.Use(gojwt.JWTAuth(config.JWT_KEY))
			//完善用户信息
			user.POST("/perfect", api.PerfectUser)
		}
	}
}
